function updateStudent() {
    var selected = $("#studentTable").bootstrapTable('getSelections');
    var selected_length = selected.length;
    if (!selected_length) {
        $MB.n_warning('请勾选需要修改的考生！');
        return;
    }
    if (selected_length > 1) {
        $MB.n_warning('一次只能修改一个考生！');
        return;
    }
    var userName = $('#user_name').text();
    var oneStudentId = selected[0].oneStudentId;
    $.post(ctx + "oneStudent/getOneStudent", { "oneStudentId": oneStudentId }, function(r) {
        if (r.code == 0) {
            var $form = $('#student-add');
            $form.modal();
            var oneStudent = r.msg;
            $("#student-add-modal-title").html('修改考生信息');
            /*$form.find("input[name='name']").val(student.name).attr("readonly",true);*/
            $form.find("input[name='id']").val(oneStudent.id);
            $form.find("input[name='name']").val(oneStudent.name);
            $form.find("input[name='oneStudentId']").val(oneStudent.oneStudentId);
            //$form.find("input[name='ssex']").val(oneStudent.ssex);
            $("input:radio[value='" + oneStudent.ssex + "']").prop("checked", true);
            $("input:radio[value='" + oneStudent.profession + "']").prop("checked", true);
            $form.find("input[name='idNumber']").val(oneStudent.idNumber);
            $form.find("input[name='receiver']").val(oneStudent.receiver);
            $form.find("input[name='direction']").val(oneStudent.direction);
            $form.find("input[name='telephone']").val(oneStudent.telephone);
            $form.find("input[name='score']").val(oneStudent.score);
            $form.find("input[name='graduateAdd']").val(oneStudent.graduateAdd);
            $form.find("input[name='note']").val(oneStudent.note);
            $form.find("input[name='userName']").val(userName);
            $("#student-add-button").attr("name", "update");
        } else {
            $MB.n_danger(r.msg);
        }
    });
}